using System;
using System.Collections.Generic;
using System.Text;
namespace MyDMS.BusinessLayer
{
	public class DocumentType: BusinessObjectBase
	{

		#region InnerClass
		public enum DocumentTypeFields
		{
			DT_Code,
			Type_Name,
			File_Extension,
			Type_Desc,
			Office_Code,
			Is_Active,
			Creation_Date,
			Updation_Date
		}
		#endregion

		#region Data Members

			int _dT_Code;
			string _type_Name;
			string _file_Extension;
			string _type_Desc;
			int? _office_Code;
			bool? _is_Active;
			DateTime? _creation_Date;
			DateTime? _updation_Date;

		#endregion

		#region Properties

		public int  DT_Code
		{
			 get { return _dT_Code; }
			 set
			 {
				 if (_dT_Code != value)
				 {
					_dT_Code = value;
					 PropertyHasChanged("DT_Code");
				 }
			 }
		}

		public string  Type_Name
		{
			 get { return _type_Name; }
			 set
			 {
				 if (_type_Name != value)
				 {
					_type_Name = value;
					 PropertyHasChanged("Type_Name");
				 }
			 }
		}

		public string  File_Extension
		{
			 get { return _file_Extension; }
			 set
			 {
				 if (_file_Extension != value)
				 {
					_file_Extension = value;
					 PropertyHasChanged("File_Extension");
				 }
			 }
		}

		public string  Type_Desc
		{
			 get { return _type_Desc; }
			 set
			 {
				 if (_type_Desc != value)
				 {
					_type_Desc = value;
					 PropertyHasChanged("Type_Desc");
				 }
			 }
		}

		public int?  Office_Code
		{
			 get { return _office_Code; }
			 set
			 {
				 if (_office_Code != value)
				 {
					_office_Code = value;
					 PropertyHasChanged("Office_Code");
				 }
			 }
		}

		public bool?  Is_Active
		{
			 get { return _is_Active; }
			 set
			 {
				 if (_is_Active != value)
				 {
					_is_Active = value;
					 PropertyHasChanged("Is_Active");
				 }
			 }
		}

		public DateTime?  Creation_Date
		{
			 get { return _creation_Date; }
			 set
			 {
				 if (_creation_Date != value)
				 {
					_creation_Date = value;
					 PropertyHasChanged("Creation_Date");
				 }
			 }
		}

		public DateTime?  Updation_Date
		{
			 get { return _updation_Date; }
			 set
			 {
				 if (_updation_Date != value)
				 {
					_updation_Date = value;
					 PropertyHasChanged("Updation_Date");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("DT_Code", "DT_Code"));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("Type_Name", "Type_Name"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Type_Name", "Type_Name",50));
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("File_Extension", "File_Extension"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("File_Extension", "File_Extension",50));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Type_Desc", "Type_Desc",200));
		}

		#endregion

	}
}
